<?php
class WelcomeServiceImpl implements WelcomeService {

    private static $WELCOME_MESSAGE_FILE = ".welcome";

    private $fullServerPath = false;

    function __construct($fullServerPath) {
        $this->fullServerPath = $fullServerPath;
    }

    public function getWelcomeMessage($path) {
        $currentDir = $this->fullServerPath . $path;
        $result = @file_get_contents($currentDir . "/" . self::$WELCOME_MESSAGE_FILE);
        if($result != FALSE) {
            return $result;
        }
        return NULL;
    }
}
?>
